/* Copyright (c) 2025 Beijing Semidrive Technology Corporation
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/********************************************************************************************************
 *  \file     Mcal_Crc32.h                                                                                  *
 *  \brief    This file contains interface header for DMA MCAL driver.                                  *
 *                                                                                                      *
 * <table>                                                                                              *
 * <tr><th>Date           <th>Version                                                                   *
 * <tr><td>2025/01/06     <td>1.0.0                                                                     *
 * </table>                                                                                             *
 *******************************************************************************************************/
#ifndef MCAL_CRC32_H
#define MCAL_CRC32_H

#ifdef __cplusplus
extern "C" {
#endif
/********************************************************************************************************
 *                                      Include header files                                            *
 *******************************************************************************************************/
#include "Mcal_Types.h"
/********************************************************************************************************
 *                                  Global Function Declarations                                        *
 *******************************************************************************************************/
/** *****************************************************************************************************
 * \brief This function service to calculate crc value.
 *
 * \verbatim
 * Syntax             : uint32 Mcal_Crc32
 *                      (
 *                          uint32 crc
 *                          const uint8 *buf
 *                          uint32 len
 *                      )
 *
 * Service ID[hex]    : None
 *
 * Sync/Async         : Synchronous
 *
 * Reentrancy         : Reentrant
 *
 * Parameters (in)    : crc     - Crc initial value.
 *                      *buf    - Pointer to data buffer.
 *                      len     - Date buffer length.
 *
 * Parameters (inout) : None
 *
 * Parameters (out)   : None
 *
 * Return value       : Return crc calculate result value.
 *
 * Description        : This function service to calculate crc value, using archv8 crc32b.
 *                      POLYNOMIAL is 0xEDB88320
 * \endverbatim
 * Traceability       :
 *******************************************************************************************************/
uint32 Mcal_Crc32(uint32 crc,  uint8 const *buf, uint32 len);
#ifdef __cplusplus
}
#endif
#endif /* MCAL_CRC32_H */
/* End of file */
